<script lang="ts" setup>
import { initPageVO, type PageDTO, type PageVO, type ResultType } from '@/type/type'
import { RouteNameEnum } from '@/enum'
import { type Develop, getDevelopPage } from '@/request/api/develop'

const page = reactive<PageDTO>({
  current: 1,
  size: 2,
  param: {
    branch: 'develop'
  }
})

let vo = ref<PageVO<Develop>>(initPageVO())
const getList = () => {
  getDevelopPage(page).then((res: ResultType<PageVO<Develop>>) => {
    vo.value = res.data
  })
}

onMounted(() => {
  getList()
})
</script>

<template>
  <el-container class="max-lg:flex-wrap">
    <DevelopBox :data="vo.list" />
  </el-container>
  <RouteA :name="RouteNameEnum.DEVELOP" message="查看详情" />
</template>

<style lang="scss" scoped></style>
